helpstring("PDFlib 2.01 Type library by Thomas Merz"),
lcid (0x00000000), // language 0 = neutral
version(2.01)
]
library PDFlib { // library name
[ dllname("pdflib_vb.dll") ]
module PDFlib { // class name
[entry("PDF_boot"), helpstring("Boot PDFlib (currently not required)"),]
void PDF_boot(void);
[entry("PDF_shutdown"), helpstring("Shut down PDFlib (currently not required)"),]
void PDF_shutdown(void);
[entry("PDF_get_opaque"), helpstring("Fetch opaque application pointer stored in PDFlib"),]
void *PDF_get_opaque([in] long p);
[entry("PDF_new2"), helpstring("Create new PDF object, optionally supplying error handler and memory allocation routines"),]
long PDF_new2([in] long errorhandler, [in] long allocproc, [in] long reallocproc, [in] long freeproc, [in] long opaque);
//long PDF_new2([in] void (*errorhandler)(long p, int type, LPCSTR msg), [in] long allocproc, [in] long reallocproc, [in] long freeproc, [in] long opaque);
[entry("PDF_new"), helpstring("Create a new PDF object"),]
long PDF_new(void);
[entry("PDF_delete"), helpstring("Delete a PDF object"),]
void PDF_delete([in] long p);
[entry("PDF_open_file"), helpstring("Open a new PDF file associated with p, using the supplied file name"),]
int PDF_open_file([in] long p, [in] LPCSTR filename);
[entry("PDF_close"), helpstring("Close the generated PDF file"),]
void PDF_close([in] long p);
[entry("PDF_begin_page"), helpstring("Start a new page"),]
void PDF_begin_page([in] long p, [in] float width, [in] float height);
[entry("PDF_end_page"), helpstring("Finish the page"),]
void PDF_end_page([in] long p);
[entry("PDF_set_transition"), helpstring("Set a transition effect for the current page"),]
void PDF_set_transition([in] long p, [in] LPCSTR type);
[entry("PDF_set_duration"), helpstring("Set the duration for a page transition effect"),]
void PDF_set_duration([in] long p, [in] float t);
[entry("PDF_set_parameter"), helpstring(""),]
void PDF_set_parameter([in] long p, [in] LPCSTR key, [in] LPCSTR value);
[entry("PDF_show"), helpstring("Print text in the current font at the current position"),]
void PDF_show([in] long p, [in] LPCSTR text);
[entry("PDF_show_xy"), helpstring("Print text in the current font at (x, y)"),]
[entry("PDF_continue_text"), helpstring("Print text at the next line"),]
void PDF_continue_text([in] long p, [in] LPCSTR text);
[entry("PDF_set_leading"), helpstring("Set the distance between text baselines"),]
void PDF_set_leading([in] long p, [in] float l);
[entry("PDF_set_text_rise"), helpstring("Set the text rise parameter"),]
void PDF_set_text_rise([in] long p, [in] float rise);
[entry("PDF_set_horiz_scaling"), helpstring("Set horizontal text scaling in percent"),]
void PDF_set_horiz_scaling([in] long p, [in] float scale);
[entry("PDF_set_text_rendering"), helpstring("Set text rendering mode"),]
void PDF_set_text_rendering([in] long p, [in] int mode);
[entry("PDF_set_text_matrix"), helpstring("Set a transformation matrix to be applied to the current font"),]
void PDF_set_text_matrix([in] long p, [in] float a, [in] float b, [in] float c, [in] float d, [in] float e, [in] float f);
[entry("PDF_set_text_pos"), helpstring("Set the text output position to (x, y)"),]
void PDF_set_text_pos([in] long p, [in] float x, [in] float y);
[entry("PDF_set_char_spacing"), helpstring("Set the horizontal character spacing in text space units"),]
void PDF_set_char_spacing([in] long p, [in] float spacing);
[entry("PDF_set_word_spacing"), helpstring("Set the horizontal word spacing in text space units"),]
void PDF_set_word_spacing([in] long p, [in] float spacing);
[entry("PDF_get_fontname"), helpstring("Return the name of the current font"),]
LPCSTR PDF_get_fontname([in] long p);
[entry("PDF_get_fontsize"), helpstring("Return the size of the current font"),]
float PDF_get_fontsize([in] long p);
[entry("PDF_get_font"), helpstring("Return the identifier of the current font"),]
int PDF_get_font([in] long p);
[entry("PDF_stringwidth"), helpstring("Return the width of text in an arbitrary font which has been selected with PDF_findfont()"),]
float PDF_stringwidth([in] long p, [in] LPCSTR text, [in] int font, [in] float size);
[entry("PDF_findfont"), helpstring("Prepare a font for later use with PDF_setfont(). The metrics will be loaded, and if embed is nonzero, the font file will be checked (but not yet used)."),]
int PDF_findfont([in] long p, [in] LPCSTR fontname, [in] LPCSTR encoding, [in] int embed);
[entry("PDF_setfont"), helpstring("Set the current font in the give size. The font descriptor must have been retrieved via PDF_findfont()"),]
void PDF_setfont([in] long p, [in] int font, [in] float fontsize);
[entry("PDF_save"), helpstring("Save the current graphics state"),]
long PDF_save ([in] long p);
[entry("PDF_restore"), helpstring("Restore the most recently saved graphics state"),]
long PDF_restore ([in] long p);
[entry("PDF_translate"), helpstring("Translate the origin of the coordinate system to (tx, ty)"),]
long PDF_translate ([in] long p, [in] float tx, [in] float ty);
[entry("PDF_scale"), helpstring("Scale the coordinate system by (sx, sy)"),]
void PDF_scale([in] long p, [in] float sx, [in] float sy);
[entry("PDF_rotate"), helpstring("Rotate the coordinate system by phi degrees"),]
long PDF_rotate ([in] long p, [in] float phi);
[entry("PDF_setdash"), helpstring("Set the current dash pattern to d1 white and d2 black units"),]
void PDF_setdash([in] long p, [in] float d1, [in] float d2);
[entry("PDF_setpolydash"), helpstring("Set a more complicated dash pattern defined by an array"),]
void PDF_setpolydash([in] long p, [in] float *darray, [in] int length);
[entry("PDF_setflat"), helpstring("Set the flatness to a value between 0 and 100 inclusive"),]
void PDF_setflat([in] long p, [in] float flat);
[entry("PDF_set_fillrule"), helpstring("Set the current fill rule to winding or evenodd"),]
void PDF_set_fillrule([in] long p, [in] LPCSTR *fillrule);
[entry("PDF_setlinejoin"), helpstring("Set the line join parameter to a value between 0 and 2 inclusive"),]
void PDF_setlinejoin([in] long p, [in] float join);
[entry("PDF_setlinecap"), helpstring("Set the linecap parameter to a value between 0 and 2 inclusive"),]